/**
 * 路由配置文件
 */
/* 权限展示的路有 */
const adminRouter = require('../views/permision/router')
/* 增删改查例子 */
const crudRouter = require('../views/crud-template/router')
// 欢迎
const welcomeRoute = require('../views/welcome/router')


/* 基础路由 */
const baseRouter = [
    {
        path: '/404',
        name: '404',
        component: (resolve) => require(['@/views/error/404'], resolve)
    },
    {
        path: '',
        component: (resolve) => require(['@/layout/index.vue'], resolve),
        redirect: '/home',
        children: [
            {
                path: '/home',
                name: 'home',
                meta: { title: '首页', icon: 'home' },
                component: (resolve) =>
                    require(['@/views/home/index'], resolve)
            }
        ]
    }]

/* 需要权限控制的路由 */
const permissionRouter = [...adminRouter, ...crudRouter, ...welcomeRoute
]

export default{ baseRouter, permissionRouter }
